home *** CD-ROM | disk | FTP | other *** search
- ;; run-pgm-on-block: Run a pgm on each line in a block.
- ;; A user defined program is called for each line in block.
- ;; Input:
- ;; A pointer to a pgm that does something to the current line. The program
- ;; SHOULD NOT delete lines or add lines and should remain on the current
- ;; line (or at least be there when it returns).
- ;; pgm knows:
- ;; That the point is at the start of the line.
- ;; All the args passed to run-pgm-on-block have been passed to it.
- ;; C Durland 4/89 Public Domain
-
- (include me2.h)
-
- (defun
- run-pgm-on-block (pointer defun pgm) HIDDEN
- {
- (byte type)(small-int left-edge width height)(int size) ;; RegionInfo
-
- (region-stats (loc type) THE-DOT THE-MARK TRUE)
-
- (beginning-of-line)
- (while (!= 0 height)
- {
- (pgm (push-args 1))
- (forward-line 1)
- (-= height 1)
- })
- }
- )
-